/**
 * 
 */
package luc.marche.au.ski.entity;

import java.util.Date;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

/**
 * @author bplaire
 *
 */
@PersistenceCapable
public class WhiteFox {

	@PrimaryKey
	@Persistent
	private String userName;
	
	@Persistent
	private int nbConnection;
	
	@Persistent
	private Date lastConnection;

	public WhiteFox(String userName) {

		super();
		this.userName = userName;
		nbConnection++;
		this.setLastConnection(new Date());
	}

	/*
	 *  Accesseur pour les champs.
	 */
	public int getNbConnection() {
		return nbConnection;
	}

	public Date getLastConnection() {
		return lastConnection;
	}

	public void setLastConnection(Date lastConnection) {
		this.lastConnection = lastConnection;
	}

	public String getUserName() {
		return userName;
	}
}
